package com.xst.business.impl;

import java.util.List;

import org.hibernate.Session;

import com.xst.business.CustomerDao;
import com.xst.model.Customer;
import com.xst.util.BaseHibernateDAO;

public class CustomerDaoImpl extends BaseHibernateDAO implements CustomerDao {
//	private Session session= null;
	private List<Customer> list = null;
	@Override
	public List<Customer> getall() {
		try {
//			session = super.getSession();
			String hql = "from Customer";
			list = super.getSession().createQuery(hql).list();
		} catch (Exception e) {
			e.printStackTrace();
		}
//		finally{
//			session.close();
//		}
		return list;
	}
	
}
